//
//  HLRtcCallKitConsts.h
//  YueYue
//
//  Created by hulu001 on 2024/1/9.
//

#ifndef HLRtcCallKitConsts_h
#define HLRtcCallKitConsts_h

#define kHLRtcCallKitErrorDomain @"com.netease.nmc.rtc.error"
#define kHLRtcCallKitBusyErrorDescription @"正在通话中"
#define kHLRtcCallKitInviteErrorDescription @"邀请发送失败"
#define kHLRtcCallKitCancelErrorDescription @"通话已接通，不能取消"
#define kHLRtcCallKit1to1LimitErrorDescription @"该操作仅限1to1模式"
#define kHLRtcCallKitChannelIsClosedErrorDescription @"通话已结束"

static const NSUInteger kHLRtcCallKitBusyError = 20000;
static const NSUInteger kHLRtcCallKitInviteError = 20001;
static const NSUInteger kHLRtcCallKitCancelError = 20002;


static const NSUInteger kHLRtcCallKitUserNotJoinedError = 20100; //!< 用户未加入
static const NSUInteger kHLRtcCallKitChannelIsClosedError = 20101; //!< 频道关闭
static const NSUInteger kHLRtcCallKit1to1LimitError = 20102; //!< 仅限1to1


typedef NS_OPTIONS(NSUInteger, HLRtcCallType) {
    HLRtcCallTypeVideo = 0,   ///视频
    HLRtcCallTypeAudio = 1 << 0, ///音频
};

typedef NS_OPTIONS(NSUInteger, HLRtcCallVideoType) {
    HLRtcCallVideoTypeNormal = 0,   ///正常视频
    HLRtcCallVideoTypeHeartVideo = 1,    ///心动30秒
    HLRtcCallVideoTypeRandomVideo = 2,     ///视频随机 0
};

typedef NS_ENUM(NSUInteger, HLRtcCallStatus) {
    HLRtcCallStatusIdle = 0, /// 闲置
    HLRtcCallStatusCalling = 1 << 0, /// 呼叫中
    HLRtcCallStatusCalled = 1 << 1, /// 正在被呼叫
    HLRtcCallStatusInCall = 1 << 2, /// 通话中
};

typedef void(^HLRtcCallKitTokenHandler)(uint64_t uid, void(^complete)(NSString *token, NSError *error));

#define kHLRtcCallKitBusyCode @"601"

static const NSUInteger kHLRtcCallKitMaxTimeOut = 2 * 60;


#endif /* HLRtcCallKitConsts_h */
